if (!name)
name = create_name (model, components, component, type);
+ if (!model)
+ {
+ babl_log ("no model specified for format '%s'", name);
+ babl_free(name);
+ return NULL;
+ }
+
+ if (!components)
+ {
+ babl_log ("no components specified for format '%s'", name);
+ babl_free(name);
+ return NULL;
+ }
+
babl = babl_db_exist (db, id, name);
if (id && !babl && babl_db_exist (db, 0, name))
babl_fatal ("Trying to reregister BablFormat '%s' with different id!", name);
else
name = babl_model_create_name (components, component);
+ if (!components)
+ {
+ babl_log("no components specified for model '%s'", name);
+ babl_free(name);
+ return NULL;
+ }
+
babl = babl_db_exist (db, id, name);
if (id && !babl && babl_db_exist (db, 0, name))
babl_fatal ("Trying to reregister BablModel '%s' with different id!", name);